import request from '@/utils/request'
import {projectApiUrl} from '../config'
/**
 * 外部设计资料登记列表
 * @param parameter
 */
export function getExteriorList(parameter){
  return request({
    url: projectApiUrl+'/exterior-design/list',
    method: 'post',
    data: parameter
  })
}

/**
 * 查看外部设计资料登记详情
 * @param id
 */
export function getExteriorOne(id){
  return request({
    url: projectApiUrl+'/exterior-design/details',
    method: 'get',
    params: id
  })
}


/**
 * 新增外部设计资料登记
 * @param data
 */
export function addExterior(data){
  return request({
    url: projectApiUrl+'/exterior-design',
    method: 'post',
    data: data
  })
}


/**
 * 删除附件
 * @param data
 */
export function deleteExteriorFile(data){
  return request({
    url: projectApiUrl+'/exterior-design/fileDelete',
    method: 'post',
    data: data
  })
}

/**
 * 编辑外部设计资料登记
 * @param data
 */
export function editExterior(data){
  return request({
    url: projectApiUrl+'/exterior-design/update',
    method: 'post',
    data: data
  })
}

/**
 *  设计问题上报列表
 */
export function problemReportList(data){
  return request({
    url: projectApiUrl+'/problemReport/list',
    method: 'post',
    data: data
  })
}

/**
 *  设计问题上报新增
 */
export function problemReportAdd(data){
  return request({
    url: projectApiUrl+'/problemReport/create',
    method: 'post',
    data: data
  })
}
/**
 *  设计问题上报列表
 */
export function problemReportEdit(data){
  return request({
    url: projectApiUrl+'/problemReport/update',
    method: 'post',
    data: data
  })
}
/**
 *  设计问题上报统计
 */
export function problemReportCount(data){
  return request({
    url: projectApiUrl+'/problemReport/count',
    method: 'post',
    data: data
  })
}

/**
 *  设计问题上报详情
 */
export function problemReportDetail(id){
  return request({
    url: projectApiUrl + '/problemReport/detail/' + id,
    method: 'post'
  })
}

/**
 *  设计问题上报删除
 */
export function problemReportDelete(id){
  return request({
    url: projectApiUrl+'/problemReport/delete/'+ id,
    method: 'post'
  })
}

/**
 *  设计问题上报待办提交
 */
export function problemReportSubmit(data){
  return request({
    url: projectApiUrl+'/problemReport/submit',
    method: 'post',
    data
  })
}


/**
 *  设计问题上报纳入案例库
 */
export function problemReportSubmitCase(id){
  return request({
    url: projectApiUrl+'/problemReport/submitCase/' + id,
    method: 'post'
  })
}

/**
 * 批量下载附件
 * */
export function problemReportBatchExport(data){
  return request({
    url: projectApiUrl+'/problemReport/batchExport',
    method: 'post',
    responseType: 'blob',
    data
  })
}